package abc.dev.auth.model;

import abc.dev.auth.to.*;
import abc.annotation.Associative;
import java.util.List;
import abc.dev.auth.model.OnlineAttrModel;
import abc.model.IEntity;
import abc.dev.auth.vo.OnlineAttrVo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import org.apache.ibatis.javassist.bytecode.ByteArray;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.nio.ByteBuffer;
import java.util.Date;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import abc.base.BaseModel;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.excel.annotation.ExcelIgnore;
import lombok.experimental.Accessors;

/**
* <p>
* 
* </p>
*
* @author linlurui
*/
@Data
@Accessors(chain = false)
@Component
@TableName("online_attr")
public class OnlineAttrModel extends BaseModel<OnlineAttrModel> implements IEntity<OnlineAttrModel> {

    private static final long serialVersionUID = 1L;

    @ExcelIgnore
    @TableField(value = "online_id", fill = FieldFill.INSERT_UPDATE)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long onlineId;

    @TableField("name")
    private String name;

    @TableField("description")
    private String description;

    @Override
    public Serializable pkVal() {
        return null;
    }

    @Override
    public OnlineAttrVo toVo() {
        OnlineAttrVo entity = new OnlineAttrVo();
        entity.setId(id);
        entity.setOnlineId(onlineId);
        entity.setName(name);
        entity.setDescription(description);
        return entity;
    }
}
